home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Indispensables / Movie Collection / MovieCollection5403.exe / {app} / web / Default / films.xsl < prev    next >
Extensible Markup Language  |  2005-05-20  |  5KB  |  133 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:import href="header.xsl"/>
  4. <xsl:output method="html" media-type="text/html; charset=ISO-8859-1"/>
  5.  
  6. <xsl:template match="/">
  7.    <html>
  8.       <head>
  9.          <title><xsl:value-of select="datapacket/@title"/></title>
  10.          <link rel="stylesheet" type="text/css" href="mc.css" />
  11. <script type="text/javascript">
  12. i1=new Image;
  13. i1.src='images/trans_pixel.gif';
  14. i2=new Image;
  15. i2.src='images/check.gif';
  16. </script>
  17.       </head>
  18.  
  19.       <body id="idbody">
  20.          <table cellpadding="0" cellspacing="0" width="100%" border="0">
  21.             <!-- EntΩte -->
  22.             <tr><td width="100%">
  23.                <xsl:call-template name="template_header" />
  24.             </td></tr>
  25.  
  26.             <tr>
  27.                <td width="100%">
  28.                   <table cellpadding="0" cellspacing="0" width="100%" border="0">
  29.                      <tr>
  30.                         <td width="100%" class="gt0deg">
  31.                            <xsl:if test="not(//datapacket/@php=1)"><a href="disconnect" class="lktoolbar">DΘconnecter</a> | </xsl:if><a href="index" class="lktoolbar">Nouvelle recherche</a> | <a href="mailto: babidyxp@free.fr" class="lktoolbar">Powered by MovieCollection ⌐ Babidyxp</a>
  32.                         </td>
  33.                         <td width="100%" class="gt0deg">
  34.                            <xsl:value-of select="datapacket/@servername"/>
  35.                         </td>
  36.                      </tr>
  37.                   </table>
  38.                </td>
  39.             </tr>
  40.  
  41.             <!-- Fin EntΩte -->
  42.  
  43.  
  44.             <tr>
  45.                <td width="100%" class="parAction">
  46.                   <table cellpadding="0" cellspacing="0">
  47.                      <tr>
  48.                         <td class="parAction">
  49.                            <img src="images/i.p.search.gif" />
  50.                         </td>
  51.                         <td class="parAction">
  52.                            RΘsultat de la recherche: <xsl:value-of select="count(//films/film)"/> film(s) trouvΘ(s).
  53.                         </td>
  54.                      </tr>
  55.                   </table>
  56.                </td>
  57.             </tr>
  58.             
  59.             <tr><td width="100%">
  60.                <p style="margin: 10px;" />
  61.                <div style="margin-top: 0px; margin-bottom: 0px; margin-right: 20px; margin-left: 20px;" >
  62.                   <table cellpadding="0" cellspacing="1" border="0" bgcolor="#9F9F9F">
  63.                      <tr>
  64.                         <xsl:for-each select="//columns/column">
  65.                            <td class="gtH" nowrap="1" align="center" style="cursor:hand;">
  66.                               <xsl:attribute name="title">Trier par [<xsl:value-of select="@caption" />]</xsl:attribute>
  67.                               <xsl:value-of select="@caption"/>
  68.                               <span>
  69.                                  <xsl:attribute name="id">h_<xsl:value-of select="@nom" /></xsl:attribute>
  70.                               </span>
  71.                            </td>
  72.                         </xsl:for-each>
  73.                      </tr>
  74.                      <xsl:apply-templates select="//films"/>
  75.                   </table>
  76.                </div>
  77.  
  78.             </td></tr>
  79.          </table>
  80.       </body>
  81.    </html>
  82. </xsl:template>
  83.  
  84. <xsl:template match="//films">
  85. <xsl:for-each select="film">
  86. <tr onmouseover="javascript:style.backgroundColor='#ccccff'" onmouseout="javascript:style.backgroundColor='white'">
  87.    <xsl:variable name="v_idx"><xsl:value-of select="@idx"/></xsl:variable>
  88.    <xsl:for-each select="@*">
  89.  
  90.       <xsl:choose>
  91.          <xsl:when test="name()='idx'">
  92.          </xsl:when>
  93.          <xsl:when test="name()='nom'">
  94.             <td class="gt2" nowrap="1">
  95.                <a>
  96.                   <xsl:attribute name="href">film?idx=<xsl:value-of select="$v_idx"/></xsl:attribute>
  97.                   <xsl:value-of select="self::node()"/>
  98.                </a>
  99.             </td>
  100.          </xsl:when>
  101.          <xsl:when test="((name()='note') or (name()='notevideo') or (name()='noteaudio'))">
  102.             <td class="gt2" nowrap="1">
  103.                <img>
  104.                   <xsl:choose>
  105.                      <xsl:when test="((self::node()>='0') and (self::node()<='5'))">
  106.                         <xsl:attribute name="src">images/stars<xsl:value-of select="self::node()"/>.gif</xsl:attribute>
  107.                      </xsl:when>
  108.                      <xsl:otherwise>
  109.                         <xsl:attribute name="src">images/stars.gif</xsl:attribute>
  110.                      </xsl:otherwise> 
  111.                   </xsl:choose>
  112.                </img>
  113.             </td>
  114.          </xsl:when>
  115.          <xsl:when test="name()='vu' or name()='film_dispo' or name()='film_reserve'">
  116.             <td class="gt2" nowrap="1" align="center">
  117.                <xsl:if test="(self::node()='1')">
  118.                   <img src="images/check.gif" />
  119.                </xsl:if>
  120.             </td>
  121.          </xsl:when>
  122.          <xsl:otherwise>
  123.             <td class="gt2" nowrap="1"><xsl:value-of select="self::node()"/></td>
  124.          </xsl:otherwise>
  125.       </xsl:choose>
  126.    </xsl:for-each>
  127. </tr>
  128. </xsl:for-each>
  129. </xsl:template>
  130.  
  131. </xsl:stylesheet>
  132.  
  133.